/*
 * Copyright (C) 2013 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "base/environment";

$mini-cal-highlight-border: #fa0;

#minical {
  background-color: #fff;
  text-shadow: none;
  border: 1px solid $ic-border-light;
  .fc-row .fc-content-skeleton {
    padding-bottom: 0; // takes off padding to ensure borders show around dates
  }
  .fc-toolbar {
    background: none;
    border-top: none;
    color: #666;
    text-shadow: none;
    padding: $ic-sp/2 0; // padding for top/bottom of toolbar
    display: flex; // allow divs below to flex
    align-items: center; // allow divs to center align vertically
    justify-content: space-around; // allows the divs to space evenly, regardless of content
    // Set order of divs
    .fc-left {order: 1;}
    .fc-center {order: 2;}
    .fc-right {order: 3;}
    .fc-clear {display: none;} // old way of clearing, don't need div for flexbox (it'll also break it)
    h2, .h2 {
      color: #666;
      border-bottom: none;
      margin: 0;
      padding: 0;
    }
    border-bottom: 1px solid $ic-border-light;
    margin-bottom: 0;
  }

  .fc-toolbar button {
    padding: 0;
    outline: 0;
    border: none;
    background: none;
    box-shadow: none;
  }

  thead.fc-head {
    display: none;
  }

  .fc-view-container {
    padding: 3px;
    table {
      border-spacing: 8px 2px;
    }
  }

  .fc-widget-content {
    background: none;
    border: 1px solid #fff;
    div {
      min-height: 0 !important;
    }
  }

  .fc-day-number {
    line-height: 1;
  }

  .fc-other-month {
    background-image: none;
  }

  .fc-bg .fc-state-highlight {
    background: $ic-color-dark;
  }

  .fc-content-skeleton .fc-state-highlight {
    color: $ic-color-light;
    font-weight: bold;
  }

  .fc-basic-view td.fc-day-number {
    padding: 3px 2px 2px 0;
  }

  .event {
    position: relative;

    &::after {
      position: absolute;
      top: 1px;
      left: 1px;
      height: 1.2em;
      right: 1px;
      border: 1px solid $ic-color-dark;
      content: " ";
    }

    .fc-day-content { display: none; }
  }
}
